Grammar-Based Construction of Indexes for Binary Jumbled Pattern Matching

نویسنده

  • Travis Gagie
چکیده

We show how, given a straight-line program with g rules for a binary string B of length n, in O ( gn ) time we can build a (2nH0(B)+ o(n))-bit index such that, given m and c, in O(1) time we can determine whether there is a substring of B with length m containing exactly c copies of 1. If we use O(n log n) bits for the index, then we can list all such substrings using O(m) time per substring.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Indexes for Jumbled Pattern Matching in Strings, Trees and Graphs

We consider how to index strings, trees and graphs for jumbled pattern matching when we are asked to return a match if one exists. For example, we show how, given a tree containing two colours, we can build a quadratic-space index with which we can find a match in time proportional to the size of the match. We also show how we need only linear space if we are content with approximate matches.

متن کامل

New algorithms for binary jumbled pattern matching

Given a pattern P and a text T , both strings over a binary alphabet, the binary jumbled string matching problem consists in telling whether any permutation of P occurs in T . The indexed version of this problem, i.e., preprocessing a string to efficiently answer such permutation queries, is hard and has been studied in the last few years. Currently the best bounds for this problem are O(n/ log...

متن کامل

Efficient Algorithm for δ-Approximate Jumbled Pattern Matching

The Jumbled Pattern Matching problem consists on finding substrings which can be permuted to be equal to a given pattern. Similarly the δ Approximate Jumbled Pattern Matching problem asks for substrings equivalent to a permutation of the given pattern, but allowing a vector of possible errors δ. Here we provide a new efficient solution for the δ Approximate Jumbled Pattern Matching problem usin...

متن کامل

Binary Jumbled Pattern Matching via All-Pairs Shortest Paths

In binary jumbled pattern matching we wish to preprocess a binary string S in order to answer queries (i, j) which ask for a substring of S that is of size i and has exactly j 1-bits. The problem naturally generalizes to node-labeled trees and graphs by replacing “substring” with “connected subgraph”. In this paper, we give an n/2 n/ log log n) 1/2 time solution for both strings and trees. This...

متن کامل

Jumbled Matching with SIMD

Jumbled pattern matching addresses the problem of finding all permuted occurrences of a substring in a text. We introduce two improved algorithms for exact jumbled matching of short patterns. Our solutions apply SIMD (Single Instruction Multiple Data) computation in order to quickly filter the text. One of them utilizes the equal any operation and the other searches for the least frequent chara...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1210.8386  شماره 

صفحات  -

تاریخ انتشار 2012